using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;


[Serializable]
public class InventoryItem
{
    public ItemData data;
    public int sizeStack;
    public int maxSizeStack;

    public InventoryItem(ItemData itemData)
    { 
        this.data = itemData;
        sizeStack = 1;
        if (itemData.Type == ItemType.Equipment)
        {
            maxSizeStack = 1;
        }
        else
        {
            maxSizeStack = 99;
        }
    }

    public bool AddStack()
    {
        if (sizeStack < maxSizeStack)
        {
            sizeStack++;
            return true;
        }
        return false;
    }

    public void RemoveStack()
    {
        sizeStack--;
    }

}
